<template>
  <div class="Viewv">
    <div class="text">
      <p>hello</p>
      {{UserName}}
    </div>
  </div>
</template>

<script>
export default {
  name: "Viewv",
  data() {
    return {
      UserName: "",
    };
  },
  created() {
    // let Name = this.$route.query.name;
    // let str = document.cookie;
    // str = str.replace(/\s*/g, "");
    // let Arr = str.split(";");
    // let obj = {};
    // Arr.forEach((v, i) => {
    //   obj[v.split("=")[0]] = v.split("=")[1];
    // });
    // this.checked = true;
    this.UserName = localStorage.getItem('User');

    setTimeout(() => {
      this.$router.push("/");
    }, 4005);
  },
};
</script>

<style lang="less">
.Viewv {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 3rem;
  background: url("../../assets/images/yan2.jpg") no-repeat center;
  background-size: 100% 100%;
  animation-name: fade; //规定需要绑定到选择器的 keyframe 名称。。
  animation-duration: 3s; //规定完成动画所花费的时间，以秒或毫秒计。
  animation-timing-function: ease-in-out; //规定动画的速度曲线。
  animation-fill-mode: forwards;
  .text {
    animation-name: don; //规定需要绑定到选择器的 keyframe 名称。。
    animation-duration: 2s; //规定完成动画所花费的时间，以秒或毫秒计。
    animation-timing-function: ease-in-out; //规定动画的速度曲线。
    animation-fill-mode: forwards;
    display: flex;
    p{
      margin-right: 30px;
    }
  }

  @keyframes don {
    0% {
      margin-top: 0;
    }

    100% {
      margin-top: 200px;
    }
  }
}

@keyframes fade {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}
</style>